using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace RetailAnalytic.Tools.SaveLocalCube
{
    public partial class FrmNameCube : Form
    {
        private string cubeFileName;
        public FrmNameCube()
        {
            InitializeComponent();
            CubeName = CubeNameGetSet;
        }

        private void ultraTextEditor1_ValueChanged(object sender, EventArgs e)
        {
            if (CubeNameGetSet == "")
            {
                this.ubt_Ok.Enabled = false;
            }
            else
            {
                this.ubt_Ok.Enabled = true;
                CubeName = CubeNameGetSet;
            }
        }
        private string CubeNameGetSet
        {
            get
            {
                string _t = "";
                if (this.ultraTextEditor1 != null)
                {
                    _t = this.ultraTextEditor1.Text;
                }
                return _t;
            }
            set
            {
                this.ultraTextEditor1.Text = value;
            }
        }
        public string CubeName
        {
            get
            {
                return cubeFileName;
            }
            set
            {
                if (CubeNameGetSet != "")
                {
                    cubeFileName = CubeNameGetSet + ".cub";
                }
                else
                {
                    cubeFileName = "";
                }
            }
        }
        
    }
}